﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SpiderHelper.Model
{
    public class Filter
    {
        public int Id { get; set; }

        public string KeyValue { get; set; }

        public Filter()
        {
            this.Id = int.MinValue;
        }

        public static List<Filter> GetList()
        {
            DavidDB.ADO.DBManager db = new DavidDB.ADO.DBManager();
            var query = db.GetList(new Filter());
            db.Commit();
            db.Dispose();
            List<Filter> filters = new List<Filter>();
            foreach (Filter f in query)
            {
                filters.Add(f);
            }
            return filters; ;
        }
    }
}
